home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / TIM001.QM < prev    next >
Text File  |  1991-08-02  |  12KB  |  201 lines

  1. *                               TIM001.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See TIMERxx.QM For Use ]
  4. *                             July 28, 1991
  5. *  Key    Subfile
  6. * =====  =========  =====================================================
  7. * @(1)            --Times Macro Command Sequences For 1 To 100,000 Repeats
  8. *                   (Inserted) In @1 Using [Del_Ch] Timing Counter
  9. * @(_)   {e:\up\TIMER14}
  10. *                 --Return To TIMERxx.QM
  11. *
  12. *-- eoi
  13.  
  14. * 
  15. * -------------------------------------------------------------------------
  16. * @(1)  Times Macro Command Sequences For 1 To 100,000 Repeats
  17. *       419 bytes Sun  07-07-1991  13:56:04 (TH @1)
  18. * -------------------------------------------------------------------------
  19. *
  20. @1  macrobegin
  21.     unmarkblock defaultwordset
  22.     setrmargin "80" return              * For timer messages on same line
  23.     insertline begline dropanchor
  24.     currentfilename copy                * Save currentfilename to return to
  25.     gotocolumn "41" return
  26.     dropanchor begline
  27.     fillblock "*" return                * Insert start line
  28.     editfile "0k" return quit           *                                   |
  29.     editfile return
  30.    "Cycle [Y=yes, Enter=no] ?"          * Y for yes, Enter for one cycle only
  31.     cursorright dropanchor
  32.     Pause
  33.     *---------------------------------------------------------------- *
  34.     *  Buffer                    Description                          *
  35.     * ========    =================================================== *
  36.     *     1   -   [Y] or [y] to cycle, [Enter] for only one cycle     *
  37.     *     2   -   Size = no of repeats to time, eg 1k = 1000 repeats  *
  38.     *     3   -   # of lines of counting characters                   *
  39.     *     4   -   # of counting characters per counting line          *
  40.     *     5   -   Character after buff 4 (* for 1/5/50/100 repeats)   *
  41.     *---------------------------------------------------------------- *
  42.     storescrbuff "1" return             * Y, or Enter for one cycle only
  43.     delline                             * Delete message line               |
  44.     editfile "$repeat" return
  45.     Pause
  46.     delrtword                           * Delete empty space                |
  47.     markcharacter                       *                                   |
  48.     gotocolumn "7" return               * Mark Size                         |
  49.     storescrbuff "2" return             * Size                              |
  50.     wordright                           *                                   |
  51.     markword                            *                                   |
  52.     storescrbuff "3" return             * # of AddLines                     |
  53.     wordright markword                  *                                   |
  54.     storescrbuff "4" return             * Chars per line to delete          |
  55.     gotoblockend                        *                                   |
  56.     unmarkblock                         *                                   |
  57.     cursorright                         * Move to empty space               |
  58.     markcharacter                       * Start mark                        |
  59.     endline                             * Mark buff 5                       |
  60.     storescrbuff "5" return             * Store buff 5, blank if nothing    |
  61.     quit                                * Quit $repeat
  62.     editfile "$line#" return quit       * Quit $line# if loaded
  63.     editfile paste return               * Return to file we started in
  64.     onewindow
  65.     *--------------------------------------------------------*
  66.     * Window    File              Description                *
  67.     * ======   ======   ==================================== *
  68.     *   1               File to record timing record         *
  69.     *   2      0k       Zero length file to count repeats    *
  70.     *   3      $line#   contains 001-999 for cycle counting  *
  71.     *--------------------------------------------------------*
  72.     horizontalwindow                    * 0k window
  73.     editfile "0k" return
  74.     shrinkwindow
  75.     cursordown cursordown cursordown
  76.     cursordown cursordown cursordown
  77.     escape
  78.     horizontalwindow                    * Cycle # window
  79.     editfile "$line#" return
  80.     endline cursorright cursorright
  81. *-- InsertTime in $line#
  82.     inserttime                          * Insert approx start time in $line#
  83.     getscrbuff "2" return               * Insert size selected
  84.     unmarkblock
  85.     prevwindow                          * 0k window
  86.  CYCLE:
  87.         getscrbuff "3" return               * Get # of addlines
  88.         cut
  89.         begline                             *                               |
  90.         getscrbuff "5" return               * Get buff 5                    |
  91.         endline                             * Test if buff 5 has text       |
  92.         jfalse L1:                          * If false, buff 5 has no text  |
  93.         delline                             *ELSE buff has text             |
  94.         getscrbuff "4" return               * Get # of chars/line to count  |
  95.         cut                                 * Cut to scrap                  |
  96.         begfile                             *                               |
  97.         markcolumn                          *                               |
  98.         gotocolumn paste return             * Go to end of block            |
  99.         fillblock "*" return                * Fill with stars               |
  100.         delch                               * Delete one counting char      |
  101.                                             * because delch "fail"= 1 rpt   |
  102. *       Pause                               * Add to see # of repeats - 1   |
  103.                                             * eg, 4 stars = 5 repeats       |
  104.         jump REFILL:                        *                               |
  105.    L1:                                      *                               |
  106.         delline                             * Delete extra line from buff 5 |
  107.         addline                             *
  108.         repeatcmd paste return              * Add lines for counting block
  109.         getscrbuff "4" return               * Get # of chars/line to count
  110.         cut                                 * Cut to scrap
  111.         cursorup cursorup                   * Move up to buff #4 line #
  112.    L2:  gotocolumn paste return             * Go to end of block
  113.         cursorleft                          * Position cursor one column    |
  114.                                             * left of # of counting chars   |
  115.                                             * because delch "fail"= 1 rpt   |
  116.         markcolumn begfile                  * Mark block end/begin
  117. *  L3:  fillblock "*" return jump REFILL:   * Count w/ all stars, for tests
  118. *  L4:  fillblock " " return jump REFILL:   * Empty block, for tests
  119.         fillblock  #248  return                         * °°°°°°°°°
  120.         gotocolumn "101" return fillblock #007 return   * 
  121.         gotocolumn "201" return fillblock #249 return   * ∙∙∙∙∙∙∙∙∙
  122.         gotocolumn "301" return fillblock #250 return   * ·········
  123.         gotocolumn "401" return fillblock "."  return   * .........
  124.  REFILL:
  125.         unmarkblock
  126.         endpara begline
  127.         prevwindow                      * Timing record window
  128.         makectrofscreen
  129.         insertline begline
  130.        "*" gotocolumn "41" return "*"   * Insert starting line of stars
  131.         *-------------------------------------------------------------------*
  132.         * My DiskPark TSR parks my hard disk after 9 minutes of no access.  *
  133.         * I don't want TSR timing interference for > 9 minutes cycling.     *
  134.         * Add these 6 lines if you have TSR disk access during cycling.     *
  135.         *-------------------------------------------------------------------*
  136. *       getscrbuff "1" return     *                                         *
  137. *       endline                   * Test if 'y' to cycle                    *
  138. *       jfalse NOSAVE_FILE:       * If false, are at eol, don't save        *
  139. *       savefile                  *ELSE save file                           *
  140. *       NOSAVE_FILE:              *                                         *
  141. *       cut                       * Remove buffer 1 from screen             *
  142.         *-------------------------------------------------------------------*
  143.         cursorright
  144. * ■■■■■ Timing Starts Here ■■■■■
  145.         Insert_Time
  146.         nextwindow                      * 0k window
  147.         TIME:* 
  148. * **** < Commands to Time (Inserted) Here> ****
  149.         Del_Ch                          * Timing Counter
  150.         jtrue TIME:
  151.         prevwindow                      * Timing record window
  152.         gotocolumn "53" return
  153. *       500_TIME: insertline            * Add to show time after counting line
  154.         deltoeol                        * Delete previous time
  155.         Insert_Time
  156. * ■■■■■ Timing Ends Here ■■■■■
  157.         prevposition                    * Move to first char of time
  158.         delrtword delch                 * Delete 'Hour:'
  159.         nextwindow                      * 0k window
  160. *       begline                         * In case inserted commands move cur
  161.         cursorup                        * Move up to next counting line
  162.         jtrue TIME:                     *  until no more lines to count
  163.         nextwindow                      * Cycle # window
  164.         begline markword
  165.         copy                            * Copy current cycle # for timer
  166.         wordright
  167.         markcolumn endline markcolumn
  168.         gotoblockbeg cursordown
  169.         moveblock                       * Move start Time/Size to next line
  170.         unmarkblock
  171.         begline scrolldown
  172.         nextwindow                      * Timing record window
  173.         endline cursorright cursorright
  174.         insertdate                      * Insertdate
  175.         wordleft delch delch            * Delete 91
  176.         wordleft wordleft wordleft
  177.         delrtword                       * Delete day of week
  178.         endline cursorright "@1"        * Insert macro key                  |
  179.         cursorright                     *                                   |
  180.         getscrbuff "2" return           * Insert size                       |
  181.         gotocolumn "77" return          *                                   |
  182.         paste                           * Insert current cycle #
  183.         unmarkblock
  184.         nextwindow                      * 0k window
  185.         getscrbuff "1" return           * Get answer to cycle prompt
  186.         endline                         * Test if answered 'y' to cycle
  187.  jtrue CYCLE:                           * If true, are at eol, cycle again
  188.         prevwindow                      * Timing record window
  189.         dropanchor                      * Mark timer to return to
  190.         prevwindow                      * Cycle number window               |
  191.         quit                            * Quit $line#                       |
  192.         editfile "0k" return quit       * Quit 0k
  193.         gotoblockbeg unmarkblock        * Return to file we started in
  194.         onewindow                       * Close all windows
  195.         begline cursorright cursorright * Position cursor to calculate time
  196. *
  197. * 380 bytes Mon  06-17-1991  21:41:37 (TH @1)
  198. * 380 bytes Fri  06-28-1991  07:26:45 (TH @1)
  199. * 419 bytes Sun  07-07-1991  13:56:04 (TH @1, added 1/5/50/100 repeats)
  200.  
  201.